import request from '@/utils/request'

// 获取表单数据
export const getMaintain = params => request({
  method: 'GET',
  url: '/device/maintain',
  params
})
// 获取设备名称
export const communityCode = params => request({
  method: 'GET',
  url: '/device/index',
  params
})
//
// 删除
export const delMaintain = id => request({
  method: 'DELETE',
  url: `device/maintain/${id}`
})
// 新增
export const postMaintain = data => request({
  method: 'POST',
  url: 'device/maintain',
  data
})
// 详情
export const editMaintain = id => request({
  method: 'GET',
  url: `device/maintain/${id}`
})
// 编辑
export const PUTMaintain = data => request({
  method: 'PUT',
  url: `device/maintain/${data.id}`,
  data
})
// 图片上传
export const Upimage = data => request({
  method: 'POST',
  url: `base/upload?field=device`,
  data
})
